<!DOCTYPE html>
<html>

<head>

  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">

  <title>角色管理</title>
  <meta name="keywords" content="">
  <meta name="description" content="">

  <link rel="shortcut icon" href="favicon.ico">
  <link href="../css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
  <link rel="stylesheet" type="text/css" href="../tree_grid/themes/default/easyui.css">
  <link rel="stylesheet" type="text/css" href="../tree_grid/themes/icon.css">
  <link rel="stylesheet" type="text/css" href="../tree_grid/demo.css">

  <link rel="stylesheet" type="text/css" href="../css/labMgt/modal.css">

  <script type="text/javascript" src="../tree_grid/jquery.min.js"></script>
  <script type="text/javascript" src="../tree_grid/jquery.easyui.min.js"></script>
  <script type="text/javascript" src="../tree_grid/treegrid-dnd.js"></script>
  <script src="../js/bootstrap.min.js?v=3.3.6"></script>

  <script type="text/javascript"  src="../js/content/role_manage.js"></script>
</head>

<body class="gray-bg">
  <div class="wrapper wrapper-content animated fadeInRight">

    <div class="row" style="margin:10px 0">
      <button class="btn btn-sm btn-primary">保存</button>
      <button class="btn btn-sm btn-primary"  data-toggle="modal" data-target="#role_modal">分配用户</button>
      <button class="btn btn-sm btn-primary"  data-toggle="modal" data-target="#role_modal">分配菜单</button>
      <button class="btn btn-sm btn-primary"  data-toggle="modal" data-target="#role_modal">分配模块</button>
    </div>

    <table id="treegrid" title="角色管理" class="easyui-treegrid" style="width:100%;height:300px"
        data-options="
                rownumbers: true,
                idField: 'id',
                treeField: 'name',
                onContextMenu: onContextMenu,
                onLoadSuccess: function(row){
                    $(this).treegrid('enableDnd', row?row.id:null);
                }
            ">
      <thead>
        <tr>
          <th data-options="field:'name'" width="30%">角色名称</th>
          <th data-options="field:'size'" width="20%" align="center">是否默认</th>
          <th data-options="field:'date'" width="50%" align="center">说明</th>
        </tr>
      </thead>
    </table>

    <div id="treegrid_menu" class="easyui-menu" style="width:120px;">
      <div data-toggle="modal" data-target="#addForm">新增节点</div>
      <div data-toggle="modal" data-target="#addForm">新增子节点</div>
      <div class="menu-sep"></div>
      <div>向上移到</div>
      <div >向上移到</div>
      <div class="menu-sep"></div>
      <div data-toggle="modal" data-target="#addForm">编辑节点</div>
      <div onclick="deleteNode()">删除节点</div>
    </div>

    <!-- 弹出框  start-->
    <div class="modal fade" id="role_modal"  role="dialog" >
      <div class="modal-dialog" role="document">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close">
              <span aria-hidden="true">&times;</span>
            </button>
            <h5 class="modal-title">分配模块</h5>
          </div>
          <div class="modal-body">
              <ul id="tt" class="easyui-tree" data-options="url:'',method:'get',animate:true,checkbox:true"></ul>
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            <button type="button" class="btn btn-primary">确定</button>
          </div>
        </div>
      </div>
    </div>
    <!-- 弹出框 stop-->

    <!-- form 表单弹框 新增addForm -->
    <div class="modal fade" id="addForm" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
      <div class="modal-dialog" role="document">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close">
              <span aria-hidden="true">&times;</span>
            </button>
            <h5 class="modal-title" id="myModalLabel">新增用户</h5>
          </div>
          <div class="modal-body">
            <form>
              <table class="form-table">
                <tbody>
                  <tr>
                    <td class="title">用户名称：</td>
                    <td>
                      <input name="username" type="text"> <b>*</b>
                    </td>
                  </tr>
                  <tr>
                    <td class="title">登录名：</td>
                    <td>
                      <input name="loginName" type="text"> <b>*</b>
                    </td>
                  </tr>
                  <tr>
                    <td class="title">密码：</td>
                    <td>
                      <input name="password" type="text">
                      <b>*</b>
                    </td>
                  </tr>
                  <tr>
                    <td class="title">身份证号码：</td>
                    <td>
                      <input name="gmsfhm" type="text"></td>
                  </tr>
                  <tr>
                    <td class="title">电子邮箱：</td>
                    <td>
                      <input name="email" type="text"></td>
                  </tr>
                  <tr>
                    <td class="title">电话号码：</td>
                    <td>
                      <input name="telePhone" type="text"></td>
                  </tr>
                  <tr>
                    <td class="title">手机号码：</td>
                    <td>
                      <input name="mobilePhone" type="text"></td>
                  </tr>
                  <tr>
                    <td class="title">系统名称：</td>
                    <td>
                      <input name="sysName" type="text">
                      <b>*</b>
                    </td>
                  </tr>
                  <tr>
                    <td class="title">是否虚拟用户：</td>
                    <td>
                      <input name="isVir" type="checkbox"></td>
                  </tr>
                  <tr>
                    <td class="title">描述：</td>
                    <td>
                      <textarea name="note" type="text"></textarea>
                    </td>
                  </tr>
                </tbody>
              </table>
            </form>
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
            <button type="button" class="btn btn-primary" onclick="popNode()">确定</button>
          </div>
        </div>
      </div>
    </div>

  </div>

</body>

</html>